import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'


const accessTokenKey ='CJ_ACCESS_TOKEN'
const refreshTokenKey ='CJ_REFRESH_TOKEN'
export function getToken(TokenKey) {
  return Cookies.get(TokenKey)
}

export function setToken(TokenKey,token) {

  window.localStorage.setItem(accessTokenKey,token)
  return Cookies.set(TokenKey, token)
}

export function removeToken(TokenKey) {
  window.localStorage.removeItem(accessTokenKey)
  return Cookies.remove(TokenKey)
}
